import { create } from "zustand";
import { subscribeWithSelector } from "zustand/middleware";
import { Object3D } from "three";

/**
 * 管理调试数据
 */
export const useDebug = /* @__PURE__ */ create(
  /* @__PURE__ */ subscribeWithSelector<DebugState>(() => {
    return {
      showCollider: false, // 显示碰撞网格
      effects: false, // 启用后处理
      target: null, // 牵引目标
    };
  })
);
export const setDebug = useDebug.setState;

type DebugState = {
  showCollider: boolean;
  effects: boolean;
  target: Object3D | null;
};
